{extend name="common/index"}
{block name="css"}

{/block}
{block name="content"}

<!--sub_nav-->
<div class="sub_nav">
    <div class="wrap clear">
        <p>你在这里：</p>
        <a href="{:url('index/index')}">首页</a> >
        <a class="on" href="javascript:void(0);">{$web.title|default=''}</a>
    </div>
</div>

<!--main-->
<div class="main search">
    <div class="wrap">
        <div class="search_title">
            <h2><span>“{$search_ele.keywords|default=''}”</span>的搜索结果，显示共<i>{$page_num.total|default='0'}</i>条</h2>
        </div>
        <div class="news_nav search_nav">
            <ul>
                <li {eq name="search_ele.type" value="goods"}class="on"{/eq}><a href="javascript:;">产品信息（<span>{$page_num.goods|default='0'}</span>）</a></li>
                <li {eq name="search_ele.type" value="article"}class="on"{/eq}><a href="javascript:;">其它信息（<span>{$page_num.article|default='0'}</span>）</a></li>
            </ul>
        </div>
        <div class="search_wrap">
            <div class="search_list {eq name="search_ele.type" value="goods"}on{/eq}">
                <div class="index_pro_list">
                    <ul class="clear">
                        {volist name="list_goods" id="vo"}
                        <li>
                            <div class="img">
                                <img src="{$vo.img_url_thumb}" alt=""/>
                            </div>
                            <div class="txt">
                                <h3 style="height: 71px;">
                                    <small>{$vo.years}</small>
                                    {$vo.goods_name}
                                </h3>
                                <p>产区：<span>{$vo.area}</span></p>
                                <a href="{:url('goods/detail')}?id={$vo.goods_id}" class="more_btn">查看详情</a>
                            </div>
                        </li>
                        {/volist}
                    </ul>
                </div>
                <div class="page">
                    {$list_goods->render()}
                </div>

            </div>
            <div class="search_list {eq name="search_ele.type" value="article"}on{/eq}">
                <div class="search_list_wrap">
                    {volist name="list_art" id="vo"}
                    <div class="search_item">
                        <h3>{$vo.title}</h3>
                        <p>{$vo.content}</p>
                        <a href="{$vo.link}" target="_blank">{$vo.link}</a>
                    </div>
                    {/volist}
                </div>
                <div class="page">
                    {$list_art->render()}
                </div>

            </div>
        </div>
    </div>
</div>

{/block}
{block name="script"}
<script type="text/javascript">
    $('.search_nav li').click(function(){
        $(this).addClass('on').siblings().removeClass('on');
        $('.search_list').eq($(this).index()).addClass('on');
        $('.search_list').eq($(this).index()).siblings().removeClass('on')
    })
</script>
{/block}
